class Animal:
    def speak(self):
        # 抽象方法
        pass


class Dog(Animal):
    def speak(self):
        print("汪汪汪")


class Cat(Animal):
    def speak(self):
        print("喵喵喵")


def make_noice(animal: Animal) -> None:
    animal.speak()


dog: Dog = Dog()
cat = Cat()

make_noice(dog)
make_noice(cat)
